package com.ctshk.rpc.user.req;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * <p>
 *  用户消息REQ
 * </p>
 *
 * @author 李新科
 * @date 2021/5/17 11:35
 */
@Data
@ApiModel()
@Accessors(chain = true)
public class UserMessageReq implements Serializable {

    @ApiModelProperty(value="要推送的用户id",required = true)
    @NotNull(message = "要推送的用户id不能为空")
    private Long userId;

    @ApiModelProperty(value="类型,0：订单通知,1：系统通知,枚举类InformType",required = true)
    @Min(value = 0,message = "非法类型")
    @Max(value = 1,message = "非法类型")
    private Integer type;

    @ApiModelProperty(value="标题",required = true)
    @NotBlank(message = "标题不能为空")
    private String title;

    @ApiModelProperty(value="内容",required = true)
    @NotBlank(message = "内容不能为空")
    private String content;

    @ApiModelProperty(value="订单id")
    private Long orderId;

    @ApiModelProperty(value="业务类型")
    private Integer businessType;
}
